package edu.unh.sustain;

import java.net.MalformedURLException;
import java.net.URL;

public class Article {

    private String          title;
    private String          description;
    private String          content;
    private URL             link;

    public Article() {
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public URL getLink() {
        return link;
    }

    public void setLink(String link) throws MalformedURLException {
        this.link = new URL(link);
    }
    
    private void setLink(URL link){
        this.link = link;
    }
    
    public Article copy() {
        Article copyA = new Article();
        copyA.setTitle(this.title);
        copyA.setLink(this.link);
        copyA.setDescription(this.description);
        copyA.setContent(this.content);
        
        return copyA;
    }

}
